package org.jeecgframework.web.service.impl;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.http.HttpEntity;
import org.apache.http.StatusLine;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.hibernate.Query;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.core.util.*;
import org.jeecgframework.web.service.CbsEsPlanIpServiceI;
import org.jeecgframework.web.service.ZyTimeTaskOfInspectionPlanService;
import org.jeecgframework.web.system.pojo.base.*;
import org.jeecgframework.web.system.service.impl.SystemServiceImpl;
import org.jeecgframework.web.util.StaticValue;
import org.jeecgframework.web.util.sendWxMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.drew.lang.DateUtil;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xiul
 * 2016-10-20 下午2:04:14
 */
@Service(value="zyTimeTaskOfInspectionPlanService")
@Transactional
public class ZyTimeTaskOfInspectionPlanServicesImpl extends CommonServiceImpl implements ZyTimeTaskOfInspectionPlanService {

	@Override
	public void AutoGenerateInspectionPlan() {
		System.out.println("开始检查符合自动生成巡检计划的设备...");
		Calendar cal = Calendar.getInstance();
		int currYear = cal.get(Calendar.YEAR);
		StringBuffer sql = new StringBuffer();
		sql.append(" SELECT ");
		sql.append(" 	es.belong_cinema_id AS cmId, es.id AS esId, es.send_date AS sendDate, ip.id AS ipId, es.send_sign AS ipCompany, es.repair_end_date AS repairEndDate, ");
		sql.append("	YEAR(es.send_date) AS sendDateYear, MONTH(es.send_date) AS sendDateMonth, MONTH(es.warranty_begin_date) AS warrantyBeginDateMonth ");
		sql.append(" FROM ");
		sql.append(" 	zy_equipment_spare es ");
		sql.append("	LEFT JOIN zy_inspection_plan ip on (ip.equipment_spare_id = es.id and YEAR(ip.ip_plan_date)='"+currYear+"')");
		sql.append(" WHERE ");
		sql.append(" (es.warranty_begin_date >= '"+currYear+"-01-01' AND es.warranty_begin_date <= '"+currYear+"-12-31') ");
		sql.append(" AND es.send_date <= '"+currYear+"-03-31' ");
		sql.append(" AND (!ISNULL(es.belong_cinema_id) AND LENGTH(trim(es.belong_cinema_id)) > 1) ");
		sql.append(" AND (!ISNULL(es.send_sign) AND LENGTH(trim(es.send_sign)) > 1) ");
		sql.append(" AND !ISNULL(es.warranty_begin_date) ");
		sql.append(" AND es.residual_ip_count > 0  ");
		sql.append(" AND ((ISNULL(ip.id) OR (!ISNULL(ip.id) AND es.repair_end_date <= '"+currYear+"-12-31')))  ");
		sql.append(" GROUP BY cmId, esId, sendDate, ipCompany, repairEndDate, ipId, sendDateYear, sendDateMonth, warrantyBeginDateMonth ");//保证相同的影院必须！！！！！！在一起
		List<Map<String, Object>> esMapList = super.findForJdbc(sql.toString());

		System.out.println("保存之前清除记录");
		super.executeSql("DELETE FROM cbs_es_plan_ip WHERE ip_year = ? AND generate_source = ?", currYear, StaticValue.DIC_GENERATE_SOURCE_REAL_TIME);
		System.out.println("清除完毕");

		if(null != esMapList && esMapList.size() > 0){

			String lastCmId = "",currCmId = "",currIpCompany = "";
			Map<String, Object> esMap = new HashMap<String, Object>();
			Map<String, Integer> companyIpMonthMap = new HashMap<String, Integer>();
			Map<String, Map<String, Integer>> cinemaIpCompanyMonth = new HashMap<String, Map<String,Integer>>();
			Date sendDate = new Date(),repairEndDate = new Date();//出货日期，保修截止日期 初始化
			Date currYearBegin = DateUtils.str2Date(currYear + "-01-01", DateUtils.date_sdf);//本年 的1月1日
			Date currYearEnd = DateUtils.str2Date(currYear + "-12-31", DateUtils.date_sdf);//本年 的12月31日
			int ipMonth = 1;//巡检月份 初始化
			for (int i = 0; i < esMapList.size(); i++) {
//				System.out.println("\n循环次数 ：" + i);
				esMap = esMapList.get(i);
				currCmId = esMap.get("cmId").toString();
				currIpCompany = esMap.get("ipCompany").toString();
				if((!lastCmId.equals("") && !lastCmId.equals(currCmId)) || //不是第一次循环，并且当前和上一个不同  or 1,2,3
						(!lastCmId.equals("") && lastCmId.equals(currCmId) && i == esMapList.size() - 1)){//不是第一次循环，并且当前和上一个相同  ，并且是最后一个 1,2,2,2
					companyIpMonthMap = new HashMap<String, Integer>();
				}
				if(null == companyIpMonthMap.get(currIpCompany)){//如果没有值，初始化为1
					companyIpMonthMap.put(currIpCompany, 1);
				}
				int warrantyBeginDateMonth = Integer.valueOf(esMap.get("warrantyBeginDateMonth").toString());//保期开始 月
				if(null != esMap.get("ipId") && !esMap.get("ipId").toString().equals("")){//有本年度巡检计划
					repairEndDate = DateUtils.str2Date(esMap.get("repairEndDate").toString(), DateUtils.date_sdf);//保修截止日期
//					System.out.println("有本年度巡检计划的保修截止日期：" + esMap.get("repairEndDate").toString());
					if(repairEndDate.getTime() <= currYearEnd.getTime()){
						ipMonth = warrantyBeginDateMonth + 1;
					}
				}else{//没有本年度巡检计划
					sendDate = DateUtils.str2Date(esMap.get("sendDate").toString(), DateUtils.date_sdf);//出货日期
					int sendDateYear = Integer.valueOf(esMap.get("sendDateYear").toString());//出货日期 年
					int sendDateMonth = Integer.valueOf(esMap.get("sendDateMonth").toString());//出货日期 月
//					System.out.println("没有本年度巡检计划的出货日期：" + esMap.get("sendDate").toString());
					if(sendDateYear == currYear){
						if(sendDateMonth == 1){//出货日期为本年度1月的，巡检月份为7月。
							ipMonth = 7;
						}else if(sendDateMonth == 2){//出货日期为本年度2月的，巡检月份为9月。
							ipMonth = 9;
						}else if(sendDateMonth == 3){//出货日期为本年度3月的，巡检月份为11月。
							ipMonth = 11;
						}
					}else{
						if(sendDate.getTime() <= currYearBegin.getTime()){//出货日期小于本年1月1日的，巡检月份为保期开始月份+1。
							ipMonth = warrantyBeginDateMonth + 1;
						}
					}
				}
//				System.out.println("暂定...月份：" + ipMonth);
//				System.out.println("companyIpMonthMap.get(currIpCompany) ：" + companyIpMonthMap.get(currIpCompany));
				companyIpMonthMap.put(currIpCompany, companyIpMonthMap.get(currIpCompany) < ipMonth ? ipMonth : companyIpMonthMap.get(currIpCompany));//保存最大月份
				if(null == cinemaIpCompanyMonth.get(currCmId)){
					cinemaIpCompanyMonth.put(currCmId,new HashMap<String, Integer>());
				}
				cinemaIpCompanyMonth.get(currCmId).putAll(companyIpMonthMap);
				lastCmId = currCmId;//记录本次影院ID
			}

			List<CbsEsPlanIpEntity> esPlanIps = new ArrayList<CbsEsPlanIpEntity>();
			//设置设备的巡检单位，巡检月份，巡检年份...
			for (Map<String,Object> map : esMapList) {
				CbsEsPlanIpEntity esPlanIp = new CbsEsPlanIpEntity();
				esPlanIp.setGenerateSource(StaticValue.DIC_GENERATE_SOURCE_REAL_TIME);//标识来源
				esPlanIp.setIpYear(currYear);
				ZyEquipmentSpareEntity es = new ZyEquipmentSpareEntity();
				es.setId(map.get("esId").toString());
				esPlanIp.setEquipmentSpare(es);
				esPlanIp.setIsAdjustment("1");
				esPlanIp.setIpCompanyId(map.get("ipCompany").toString());
				esPlanIp.setCinemaId(map.get("cmId").toString());
//				System.out.println("月份：" + cinemaIpCompanyMonth.get(esPlanIp.getCinemaId()).get(esPlanIp.getIpCompanyId()));
				esPlanIp.setIpMonth(cinemaIpCompanyMonth.get(esPlanIp.getCinemaId()).get(esPlanIp.getIpCompanyId()));
				esPlanIp.setCreateDate(new Date());
				esPlanIps.add(esPlanIp);
			}

			System.out.println("开始保存" + esPlanIps.size() + "条数据");
			super.batchSave(esPlanIps);
			System.out.println("保存新数据完毕");
		}else{
			System.out.println("没有符合自动生成巡检计划条件的设备。");
		}

	}

    //18/7/19   由于CPU占用率较高，修改为查找近7天的数据
    public void checkPlanForSendWechat() {
        //获取7天以前时间
        String str = "";
        Date endDate = null;
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            Calendar lastDate = Calendar.getInstance();
            lastDate.roll(Calendar.DATE, -7);//日期回滚7天
            str = sdf.format(lastDate.getTime());
            endDate = sdf.parse(str);
        } catch (ParseException e) {
            e.printStackTrace();
        }

        String query = "from ZyInspectionPlanEntity where hadSendWcMsg='0' and state=:states and reportCommitTime>:endDate";
        Query queryObject = getSession().createQuery(query);
        queryObject.setParameter("states", StaticValue.DIC_PLAN_STATE_INSPECTION_COMPLETE);
        queryObject.setParameter("endDate", endDate);
        List<ZyInspectionPlanEntity> plans = queryObject.list();
        for (ZyInspectionPlanEntity plan : plans) {
            //plan.getContacter() != null && plan.getContacter().getBelongOrg() != null)
            if(plan.getZyCmIpCt() != null && plan.getZyCmIpCt().getTsBaseUser() != null && !StringUtil.isEmpty(plan.getZyCmIpCt().getTsBaseUser().getOpenId())){
				try {
					//调用微信接口发送
					List<Map<String,String>> list=new ArrayList<>();
					String content = "尊敬的客户：请您对我们的服务打分："+ (plan.getContacter() != null && plan.getContacter().getBelongOrg() != null ? plan.getContacter().getBelongOrg().getDepartname():"")+"在您影院的巡检工作已经完成。请您在<个人中心>-<我的服务单>中对本次服务进行评价。";
					if(StringUtil.isNotEmpty(plan.getZyCmIpCt().getTsBaseUser().getOpenId())){
						Map<String,String> map=new HashMap<>();
						map.put("openid",plan.getZyCmIpCt().getTsBaseUser().getOpenId());
						map.put("message",content);
						list.add(map);
						this.sendMsgForWx(list);
					}
				} catch (Exception e) {
					e.printStackTrace();
				}
            }
        }
    }

	public String sendMsgForWx(List<Map<String,String>> list) throws Exception{
		String jsonString="";
		String url=StaticValue.WX_SEND_MSG_NEW;
		JSONArray tpl = new JSONArray();
		if(list.size()>0){
			for(Map<String,String> map:list){
				JSONObject jsonParam = new JSONObject();
				jsonParam.put("openid", map.get("openid"));
				jsonParam.put("message",map.get("message"));
				tpl.add(jsonParam);

				//系统日志
                HttpServletRequest request = ContextHolderUtils.getRequest();
                String broswer = "";
                if (null != request) {
                    broswer = BrowserUtils.checkBrowse(request);
                }
                TSLog log = new TSLog();
                log.setLogcontent("发送微信消息成功。用户："+map.get("openid")+"。内容："+map.get("message"));
                log.setLoglevel(Globals.Log_Type_OTHER);
                log.setOperatetype(Globals.Log_Leavel_INFO);
                log.setNote(IpUtil.getIpAddr(request));
                log.setBroswer(broswer);
                log.setOperatetime(DateUtils.gettimestamp());
                log.setTSUser(ResourceUtil.getSessionUserName());
                commonDao.save(log);
			}
		}
		JSONObject jsonArr=new JSONObject();
		jsonArr.put("tpl",tpl);

		System.out.println("tplPost:"+jsonArr.toString());
		CloseableHttpClient httpclient = HttpClients.createDefault();
		CloseableHttpResponse response = null;
		HttpPost httpPost=new HttpPost(url);
		try{
			httpPost.setHeader("Accept", "application/json");
			httpPost.setHeader("Content-Type", "application/json");
			StringEntity entity = new StringEntity(jsonArr.toString(), "utf-8");
			entity.setContentEncoding("UTF-8");
			entity.setContentType("application/json");
			httpPost.setEntity(entity);
			response = httpclient.execute(httpPost);

			StatusLine status = response.getStatusLine();
			int state = status.getStatusCode();
			if (state == org.apache.http.HttpStatus.SC_OK) {
				HttpEntity responseEntity = response.getEntity();
				jsonString= EntityUtils.toString(responseEntity);
				System.out.println("返回："+jsonString);
			}else{
				System.out.println("请求返回:"+state+"("+url+")");
			}

		}finally {
			if (response != null) {
				try {
					response.close();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			try {
				httpclient.close();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		return jsonString;
	}
	@Override
	public void getInfoFromLastYearIps() {
		/*
		 * 	1、每年的1月1日零点，将上一年的状态为“巡检计划已完成”的巡检计划的完成时间，更新到设备表的去年巡检时间里去。同时取得巡检计划及其完工信息插入到巡检历史表中。
			2、如果上一年的状态为“巡检计划已完成”的巡检计划不止一次，取时间距离最近的一次去更新设备表。但是巡检历史应该都插入。
			3、验证方法：生成巡检计划页面中“去年巡检日期”正确，设备详情页面中的巡检历史列表正确。
		 */
		System.out.println("开始执行定时任务：[一年一次的定时任务]");
		Calendar cal = Calendar.getInstance();
		int currYear = cal.get(Calendar.YEAR);
		StringBuffer sql = new StringBuffer();
		sql.append(" 	SELECT ");
		sql.append(" 		ip.id AS ipId, es.id AS esId, ip.end_time, ");
		sql.append(" 		es.sn, ip.plan_id, ip.actual_date, dp.shortname, eg.`name` AS egName, ");
		sql.append(" 		rm.room_num, ir.yt_rm_humidity, ir.yt_rm_temperature, ir.lq_coolant_liquid_h, ");
		sql.append(" 		ir.lq_score_coolant, ir.lq_vent_speed, ir.qj_dust_filter_cl_mp, ir.xl_zero_voltage, ");
		sql.append(" 		ir.xd_run_time, ir.xd_run_count, ir.gx_light_path, ir.yx_light_c, ir.total_run_time, ");
		sql.append(" 		ir.after_score, ir.eng_item_sn, ir.ti_icp_item_sn, ir.lps_item_sn, ir.enigma_item_sn, ");
		sql.append(" 		ir.controler_item_sn, ir.smps_item_sn, ir.server_brand,  ");
		sql.append(" 		ir.server_model, ir.comprehensive_evaluation ");
		sql.append(" 	FROM ");
		sql.append(" 		zy_inspection_plan ip ");
		sql.append(" 	LEFT JOIN zy_equipment_spare es ON es.id = ip.equipment_spare_id ");
		sql.append(" 	LEFT JOIN zy_room rm on rm.id = es.house ");
		sql.append(" 	LEFT JOIN zy_inspection_report ir ON ir.inspection_plan_id = ip.id ");
		sql.append(" 	LEFT JOIN t_s_depart dp on dp.org_code = ip.company ");
		sql.append(" 	LEFT JOIN zy_engineer eg on eg.id = ip.engineer ");
		sql.append(" 	WHERE ");
		sql.append(" 		YEAR (ip.end_time) = ").append((currYear - 1)).append(" ");
//		sql.append(" 		YEAR (ip.end_time) = ").append((currYear)).append(" ");//测试用
		sql.append(" 		AND ip.state = '").append(StaticValue.DIC_PLAN_STATE_INSPECTION_COMPLETE).append("' ");
		sql.append(" 	ORDER BY ");
		sql.append(" 		es.sn, ip.end_time DESC ");
		List<Map<String, Object>> rsMapList = super.findForJdbc(sql.toString());

		if(rsMapList != null && rsMapList.size() > 0){
			try {
				//取出所有设备
				List<ZyEquipmentSpareEntity> ess = super.findByProperty(ZyEquipmentSpareEntity.class, "isSpare", false);
				Map<String, ZyEquipmentSpareEntity> esIdEsMap = new HashMap<String, ZyEquipmentSpareEntity>();
				//放入 键值为 设备ID ：设备 的Map中，方便后续根据设备ID更新设备
				for(ZyEquipmentSpareEntity es : ess){
					esIdEsMap.put(es.getId(), es);
				}

				//用来保存待更新设备的list
				List<ZyEquipmentSpareEntity> todoUpdateEss = new ArrayList<ZyEquipmentSpareEntity>();
				//用来保存待新增的巡检历史的list
				List<ZyInspectionRecordEntity> ipRecords = new ArrayList<ZyInspectionRecordEntity>();

				String lastEsId = "",currEsId = "";
				for(Map<String, Object> map : rsMapList){
					if(!StringUtil.isNotEmpty(map.get("esId")) ||
							!StringUtil.isNotEmpty(map.get("end_time")) ||
								!StringUtil.isNotEmpty(map.get("sn"))){
						continue;
					}
					currEsId = map.get("esId").toString();
					if(!lastEsId.equals(currEsId)){//如果一个设备一年内多次巡检，只取最后的一次巡检结束时间更新到设备里
						ZyEquipmentSpareEntity es = new ZyEquipmentSpareEntity();
						es = esIdEsMap.get(currEsId);//根据设备ID取出设备
						es.setLastYearInspectionDate(DateUtils.str2Date(map.get("end_time").toString(), DateUtils.datetimeFormat));
						todoUpdateEss.add(es);
					}

					ZyInspectionRecordEntity ipRecord = new ZyInspectionRecordEntity();
					if(StringUtil.isNotEmpty(map.get("sn"))){
						ipRecord.setSpareSn(map.get("sn").toString());
					}
					if(StringUtil.isNotEmpty(map.get("plan_id"))){
						ipRecord.setPlanId(map.get("plan_id").toString());
					}
					if(StringUtil.isNotEmpty(map.get("actual_date"))){
						// Modify start 应为巡检计划的end_time，actual_date是null 2018/02/23 Amy.Li
//						ipRecord.setActualDate(DateUtils.str2Date(map.get("actual_date").toString(), DateUtils.datetimeFormat));
						ipRecord.setActualDate(DateUtils.str2Date(map.get("end_time").toString(), DateUtils.datetimeFormat));
						// Modify end 应为巡检计划的end_time，actual_date是null 2018/02/23 Amy.Li
					}
					if(StringUtil.isNotEmpty(map.get("shortname"))){
						ipRecord.setCompany(map.get("shortname").toString());
					}
					if(StringUtil.isNotEmpty(map.get("egName"))){
						ipRecord.setEngineer(map.get("egName").toString());
					}
					if(StringUtil.isNotEmpty(map.get("room_num"))){
						ipRecord.setHouse(map.get("room_num").toString());
					}
					if(StringUtil.isNotEmpty(map.get("yt_rm_humidity"))){
						ipRecord.setYtRmHumidity(map.get("yt_rm_humidity").toString());
					}
					if(StringUtil.isNotEmpty(map.get("yt_rm_temperature"))){
						ipRecord.setYtRmTemperature(map.get("yt_rm_temperature").toString());
					}
					if(StringUtil.isNotEmpty(map.get("lq_coolant_liquid_h"))){
						ipRecord.setLqCoolantLiquidH(map.get("lq_coolant_liquid_h").toString());
					}
					if(StringUtil.isNotEmpty(map.get("lq_score_coolant"))){
						ipRecord.setLqScoreCoolant(map.get("lq_score_coolant").toString());
					}
					if(StringUtil.isNotEmpty(map.get("lq_vent_speed"))){
						ipRecord.setLqVentSpeed(map.get("lq_vent_speed").toString());
					}
					if(StringUtil.isNotEmpty(map.get("qj_dust_filter_cl_mp"))){
						ipRecord.setQjDustFilterClMp(map.get("qj_dust_filter_cl_mp").toString());
					}
					if(StringUtil.isNotEmpty(map.get("xl_zero_voltage"))){
						ipRecord.setXlZeroVoltage(map.get("xl_zero_voltage").toString());
					}
					if(StringUtil.isNotEmpty(map.get("xd_run_time"))){
						ipRecord.setXdRunTime(map.get("xd_run_time").toString());
					}
					if(StringUtil.isNotEmpty(map.get("xd_run_count"))){
						ipRecord.setXdRunCount(map.get("xd_run_count").toString());
					}
					if(StringUtil.isNotEmpty(map.get("gx_light_path"))){
						ipRecord.setGxLightPath(map.get("gx_light_path").toString());
					}
					if(StringUtil.isNotEmpty(map.get("yx_light_c"))){
						ipRecord.setYxLightC(map.get("yx_light_c").toString());
					}
					if(StringUtil.isNotEmpty(map.get("total_run_time"))){
						ipRecord.setTotalRunTime(map.get("total_run_time").toString());
					}
					if(StringUtil.isNotEmpty(map.get("after_score"))){
						ipRecord.setAfterScore(map.get("after_score").toString());
					}
					if(StringUtil.isNotEmpty(map.get("eng_item_sn"))){
						ipRecord.setEngItemId(map.get("eng_item_sn").toString());
					}
					if(StringUtil.isNotEmpty(map.get("ti_icp_item_sn"))){
						ipRecord.setTiIcpItemId(map.get("ti_icp_item_sn").toString());
					}
					if(StringUtil.isNotEmpty(map.get("lps_item_sn"))){
						ipRecord.setLpsItemId(map.get("lps_item_sn").toString());
					}
					if(StringUtil.isNotEmpty(map.get("enigma_item_sn"))){
						ipRecord.setEngItemId(map.get("enigma_item_sn").toString());
					}
					if(StringUtil.isNotEmpty(map.get("controler_item_sn"))){
						ipRecord.setControlerItemId(map.get("controler_item_sn").toString());
					}
					if(StringUtil.isNotEmpty(map.get("smps_item_sn"))){
						ipRecord.setSmpsItemId(map.get("smps_item_sn").toString());
					}
					if(StringUtil.isNotEmpty(map.get("server_brand"))){
						ipRecord.setServerBrand(map.get("server_brand").toString());
					}
					if(StringUtil.isNotEmpty(map.get("server_model"))){
						ipRecord.setServerModel(map.get("server_model").toString());
					}
					if(StringUtil.isNotEmpty(map.get("comprehensive_evaluation"))){
						ipRecord.setComprehensiveEvaluation(map.get("comprehensive_evaluation").toString());
					}

					ipRecords.add(ipRecord);

					lastEsId = currEsId;//保存上一次取出的设备ID
				}

				if(todoUpdateEss.size() > 0){
					System.out.println("开始更新["+ todoUpdateEss.size() +"]条设备数据...");
					super.batchUpdate(todoUpdateEss);
					System.out.println("更新设备完毕," + DateUtils.date2Str(new Date(), DateUtils.datetimeFormat));
				}
				if(ipRecords.size() > 0){
					System.out.println("开始保存["+ ipRecords.size() +"]条巡检记录数据...");
					super.batchSave(ipRecords);
					System.out.println("保存巡检计划完毕," + DateUtils.date2Str(new Date(), DateUtils.datetimeFormat));
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}else{
			System.out.println("没有可更新的数据");
		}
		System.out.println("定时任务执行完毕：[一年一次的定时任务]");
	}


}
